package org.dashboard.dao;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.dashboard.bean.AdRole;

import java.util.List;
import java.util.Map;

@Mapper
public interface AdRoleMapper {
    int deleteByPrimaryKey(Integer roleId);

    int insert(AdRole record);

    int insertSelective(AdRole record);

    AdRole selectByPrimaryKey(Integer roleId);

    int updateByPrimaryKeySelective(AdRole record);

    int updateByPrimaryKey(AdRole record);


    List<AdRole> selectAdRoles();

    List<AdRole> selectUserAdRoles(@Param("userId")Integer userId);

    List<Map<String, Object>> selectUserRoles(@Param("userId")Integer userId);

    List<AdRole> selectAdRolesSearched(@Param("criteria")String criteria);
}